package com.xgp.company.创建型模式.第二种_工厂模式.抽象工厂模式;

public class Client {
    public static void main(String[] args) {
        System.out.println("================小米系列产品=================");
        //小米工厂
        XiaomiFactory xiaomiFactory = new XiaomiFactory();

        //小米手机
        IPhoneProduct iphoneProduct = xiaomiFactory.iphoneProduct();

        iphoneProduct.start();
        iphoneProduct.callup();
        iphoneProduct.sendSMS();
        iphoneProduct.shutdown();

        //小米路由器
        IRouterProduct routerProduct = xiaomiFactory.routerProduct();

        routerProduct.start();
        routerProduct.openWifi();
        routerProduct.setting();
        routerProduct.shutdown();

        System.out.println("================华为系列产品=================");
        //华为工厂
        HuaweiFactory huaweiFactory = new HuaweiFactory();

        //华为手机
        iphoneProduct = huaweiFactory.iphoneProduct();

        iphoneProduct.start();
        iphoneProduct.callup();
        iphoneProduct.sendSMS();
        iphoneProduct.shutdown();

        //华为路由器
        routerProduct = huaweiFactory.routerProduct();

        routerProduct.start();
        routerProduct.openWifi();
        routerProduct.setting();
        routerProduct.shutdown();
    }
}
